Eclipse Platform
Pre-release 3.0

org.eclipse.ui.commands
Interface ICommandManager


public interface ICommandManager

An instance of ICommandManager can be used to obtain instances of ICommand, as well as manage whether or not those instances are active or inactive, enabled or disabled.

This interface is not intended to be extended or implemented by clients.

EXPERIMENTAL

Since:
3.0
See Also:
CommandManagerFactory, ICommand, ICommandManagerListener

Method Summary
 void addCommandManagerListener(ICommandManagerListener commandManagerListener)
          Registers an instance of ICommandManagerListener to listen for changes to attributes of this instance.
 Set getActiveActivityIds()
          TODO javadoc
 String getActiveKeyConfigurationId()
          TODO javadoc
 String getActiveLocale()
          TODO javadoc
 String getActivePlatform()
          TODO javadoc
 ICategory getCategory(String categoryId)
          Returns a handle to a category given an identifier.
 ICommand getCommand(String commandId)
          Returns a handle to a command given an identifier.
 Set getDefinedCategoryIds()
           Returns the set of identifiers to defined categories.
 Set getDefinedCommandIds()
           Returns the set of identifiers to defined commands.
 Set getDefinedKeyConfigurationIds()
           Returns the set of identifiers to defined key configurations.
 IKeyConfiguration getKeyConfiguration(String keyConfigurationId)
          Returns a handle to a key configuration given an identifier.
 Map getPartialMatches(KeySequence keySequence)
          TODO javadoc
 String getPerfectMatch(KeySequence keySequence)
          TODO javadoc
 boolean isPartialMatch(KeySequence keySequence)
          TODO javadoc
 boolean isPerfectMatch(KeySequence keySequence)
          TODO javadoc
 void removeCommandManagerListener(ICommandManagerListener commandManagerListener)
          Unregisters an instance of ICommandManagerListener listening for changes to attributes of this instance.
 void setActiveActivityIds(Set activeActivityIds)
          Sets the set of identifiers to active activities.
 void setActiveKeyConfigurationId(String activeKeyConfigurationId)
          TODO javadoc
 void setActiveLocale(String activeLocale)
          TODO javadoc
 void setActivePlatform(String activePlatform)
          TODO javadoc
 

Method Detail

addCommandManagerListener

public void addCommandManagerListener(ICommandManagerListener commandManagerListener)
Registers an instance of ICommandManagerListener to listen for changes to attributes of this instance.

Parameters:
commandManagerListener - the instance of ICommandManagerListener to register. Must not be null. If an attempt is made to register an instance of ICommandManagerListener which is already registered with this instance, no operation is performed.

getActiveActivityIds

public Set getActiveActivityIds()
TODO javadoc


getActiveKeyConfigurationId

public String getActiveKeyConfigurationId()
TODO javadoc


getActiveLocale

public String getActiveLocale()
TODO javadoc


getActivePlatform

public String getActivePlatform()
TODO javadoc


getCategory

public ICategory getCategory(String categoryId)
Returns a handle to a category given an identifier.

Parameters:
categoryId - an identifier. Must not be null
Returns:
a handle to a category.

getCommand

public ICommand getCommand(String commandId)
Returns a handle to a command given an identifier.

Parameters:
commandId - an identifier. Must not be null
Returns:
a handle to a command.

getDefinedCategoryIds

public Set getDefinedCategoryIds()

Returns the set of identifiers to defined categories.

Notification is sent to all registered listeners if this attribute changes.

Returns:
the set of identifiers to defined categories. This set may be empty, but is guaranteed not to be null. If this set is not empty, it is guaranteed to only contain instances of String.

getDefinedCommandIds

public Set getDefinedCommandIds()

Returns the set of identifiers to defined commands.

Notification is sent to all registered listeners if this attribute changes.

Returns:
the set of identifiers to defined commands. This set may be empty, but is guaranteed not to be null. If this set is not empty, it is guaranteed to only contain instances of String.

getDefinedKeyConfigurationIds

public Set getDefinedKeyConfigurationIds()

Returns the set of identifiers to defined key configurations.

Notification is sent to all registered listeners if this attribute changes.

Returns:
the set of identifiers to defined key configurations. This set may be empty, but is guaranteed not to be null. If this set is not empty, it is guaranteed to only contain instances of String.

getKeyConfiguration

public IKeyConfiguration getKeyConfiguration(String keyConfigurationId)
Returns a handle to a key configuration given an identifier.

Parameters:
keyConfigurationId - an identifier. Must not be null
Returns:
a handle to a key configuration.

getPartialMatches

public Map getPartialMatches(KeySequence keySequence)
TODO javadoc


getPerfectMatch

public String getPerfectMatch(KeySequence keySequence)
TODO javadoc


isPartialMatch

public boolean isPartialMatch(KeySequence keySequence)
TODO javadoc


isPerfectMatch

public boolean isPerfectMatch(KeySequence keySequence)
TODO javadoc


removeCommandManagerListener

public void removeCommandManagerListener(ICommandManagerListener commandManagerListener)
Unregisters an instance of ICommandManagerListener listening for changes to attributes of this instance.

Parameters:
commandManagerListener - the instance of ICommandManagerListener to unregister. Must not be null. If an attempt is made to unregister an instance of ICommandManagerListener which is not already registered with this instance, no operation is performed.

setActiveActivityIds

public void setActiveActivityIds(Set activeActivityIds)
Sets the set of identifiers to active activities.

Parameters:
activeActivityIds - the set of identifiers to active activities. This set may be empty, but it must not be null. If this set is not empty, it must only contain instances of String.

setActiveKeyConfigurationId

public void setActiveKeyConfigurationId(String activeKeyConfigurationId)
TODO javadoc


setActiveLocale

public void setActiveLocale(String activeLocale)
TODO javadoc


setActivePlatform

public void setActivePlatform(String activePlatform)
TODO javadoc


Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.